package com.app.navigationlearnmodule.bussiness.pagetwo

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.navigation.Navigation
import com.app.common.fragment.BaseFragment
import com.app.navigationlearnmodule.R
import kotlinx.android.synthetic.main.fragment_page_two.*

class PageTwoFragment : BaseFragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {

        val view = inflater.inflate(R.layout.fragment_page_two, container, false)

        view.findViewById<Button>(R.id.fragment_page_two_btn).setOnClickListener {

            Navigation.findNavController(it).navigate(R.id.action_pageTwoFragment_to_pageThreeFragment)

        }

        return view
    }

}